#!/bin/bash

if [[ $# -ne 1 ]]; then
    echo "The format is as follows:"
    echo "bash nanopack.sh  installpath"
	echo ":param installpath: 应用安装绝对路径"
    exit 1
fi

[[ ! "$1" =~ ^/.* || ! -d "$1" || "$1" = "/" ]] &&  echo "请输入正确的安装路径" && exit 1

installpath=$1
[[ "$installpath" =~ .*/$ ]] && installpath=${installpath%/*}

$installpath/python3/bin/pip3 install --upgrade pip
$installpath/python3/bin/pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple nanopack==1.1.0

